import { createRouter, createWebHistory } from 'vue-router'
import main from '../views/Main.vue'

const router = createRouter({
  routes: [
    {
      path: '/',
      name: 'main',
      component: main,
      redirect: 'home',
      children: [
        {
          path: '/home',
          name: 'home',
          component: () => import('../views/Home.vue'),
        },
        {
          path: '/user',
          name: 'user',
          component: () => import('../views/User.vue'),
        },
      ]
    },

  ],
  // history: createWebHistory(import.meta.env.BASE_URL),
  history: createWebHistory(),
})

export default router
